package apollo.generator.modules.service;

import apollo.generator.common.exception.CustomException;
import apollo.generator.common.utils.PageUtils;
import apollo.generator.modules.entity.DataBaseConfigEntity;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <Description>
 * 数据库配置
 * @author Jun Lee
 * @email tommy2015yoyo@163.com
 * @createDate 2020-07-02 10:21:00
 */
public interface DataBaseConfigService extends IService<DataBaseConfigEntity> {

    PageUtils queryPage(Map<String, Object> params) throws CustomException;

    /**
     * 启用/禁用
     * @param id
     * @param enable
     * @param userId
     */
    void enable(Long id, Integer enable, Long userId);

    /**
     * 获取启用的数据库
     * @return
     * @throws CustomException
     */
    DataBaseConfigEntity selectEnableDataBase() throws CustomException;
}

